import 'package:flutter/material.dart';
import 'package:local_coffee/components/icon.dart';
import 'package:local_coffee/components/rgba.dart';
import 'package:local_coffee/routes/index.dart';
import 'package:local_coffee/utils/global.dart';

class AddressRow extends StatelessWidget {
  
  final bool borderBottom;

  AddressRow({
    this.borderBottom = true
  });

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.symmetric(horizontal: 15),
      child: Container(
        padding: EdgeInsets.symmetric(vertical: 12),
        decoration: BoxDecoration(border: G.borderBottom(show: borderBottom)),
        child: Column(
          children: <Widget>[
            Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: <Widget>[
                Text(
                  '青年店',
                  style: TextStyle(
                    color: RGBA.rgba383838,
                    fontSize: 16
                  ),
                ),
                Text(
                  '55m',
                  style: TextStyle(
                    color: RGBA.rgba383838,
                    fontSize: 14
                  ),
                )
              ],
            ),
            Container(
              child: Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                crossAxisAlignment: CrossAxisAlignment.center,
                children: <Widget>[
                  Row(
                    crossAxisAlignment: CrossAxisAlignment.center,
                    children: <Widget>[
                      Container(
                        alignment: Alignment.centerLeft,
                        width: 15,
                        height: 20,
                        child: icon0xe623(
                          color: RGBA.rgbad9d9d9,
                          size: 12
                        ),
                      ),
                      Container(
                        margin: EdgeInsets.only(top: 1),
                        child: Text(
                          '07:00 - 20:00',
                          style: TextStyle(
                            color: RGBA.rgbad9d9d9,
                            fontSize: 12
                          ),
                        ),
                      )
                    ],
                  ),
                  Row(
                    children: <Widget>[
                      InkWell(
                        child: Text(
                          '查看详情',
                          style: TextStyle(
                            color: RGBA.rgba557a9d,
                            fontSize: 11
                          ),
                        ),
                        onTap: () => Navigator.pushNamed(context, N.storeDetail),
                      ),
                      Container(
                        margin: EdgeInsets.only(top: 2),
                        child: icon0xe60f(
                          color: RGBA.rgba557a9d,
                          size: 11
                        ),
                      )
                    ],
                  )
                ],
              ),
            ),
            Row(
              children: <Widget>[
                Container(
                  alignment: Alignment.centerLeft,
                  width: 15,
                  height: 20,
                  child: icon0xe60f(
                    color: RGBA.rgbaa6a6a6,
                    size: 12
                  ),
                ),
                Container(
                  child: Text(
                    'xx区xx路xx号xxx幢xxx层Xxx号',
                    style: TextStyle(
                      color: RGBA.rgbaa6a6a6,
                      fontSize: 12
                    ),
                  ),
                ),
              ],
            )
          ],
        ),
      ),
    );
  }
}